package excption.work;

public class test5 {
    public static void main(String[] args) {
        Student str=new Student();
        try {
            str.setAge(1000);
        } catch (Exception e) {
            System.out.println("年龄不合法");
        }
        System.out.println(str.getAge());
    }
}
